function Ajax(url:string,callback:any,type:string='get'){
    const xhr=new XMLHttpRequest()
    xhr.open(type,url,true)
    xhr.send()
    xhr.onreadystatechange=()=>{
        if(xhr.status===200&&xhr.readyState===4){
             return callback(JSON.parse(xhr.response))
        }
    }
}